package structs

import "math"

type Rectangle struct {
	Width  float64
	Height float64
}

type Circle struct {
	Radius float64
}
type Shape interface {
	Area() float64
}

func (r Rectangle) Area() float64 {
	return r.Height * r.Width
}
func (c Circle) Area() float64 {
	return c.Radius * c.Radius * math.Pi
}

//func Perimeter(f float64, f2 float64) float64 {
//	return 2*f + 2*f2
//}
func Perimeter(r Rectangle) float64 {
	return 2 * (r.Width + r.Height)
}

//func Area(f float64, f2 float64) float64 {
//	return f * f2
//}
//func Area(r Rectangle) float64 {
//	return r.Height * r.Width
//}
func Area(r Circle) float64 {
	return r.Radius * r.Radius * 3.14
}

type Person struct {
	name string
	age  int
}
type Men struct {
	//men Men
	person Person
	sex    bool
}

type Rect struct {
	width, height int
}

func (r *Rect) area() int {
	return r.width * r.height
}

func (r Rect) perim() int {
	return 2*r.width + 2*r.height
}
